<?php
namespace app\index\model;
use app\common\model\BaseModel;
/**
 * 权限规则model
 */
class AuthGroupModel extends BaseModel{
    protected $table = 'think_auth_group';
	/**
	 * 传递主键id删除数据
	 * @param  array   $map  主键id
	 * @return boolean       操作是否成功
	 */
	public function deleteData($map){
        $result = $this->where($map)->delete();
		$group_map=array(
			'group_id'=>$map['id']
			);
		// 删除关联表中的组数据
        $model = new AuthGroupAccessModel();
		$model->deleteData($group_map);
		return $result;
	}



}
